<template>
<!-- 导航栏组件 -->
  <div>
     <div class="nav-bar" :style="{backgroundColor: bgccolor}">
      <div class="nav-left"><slot></slot></div>
      <div class="nav-center">
        <div class="location"><span>上海</span>
        <van-icon name="arrow-down" size='0.125rem' />
        </div>
       <form action="/">
  <van-search
    placeholder="输入小区或地址"
  />
</form>
      </div>
      <div class="nav-right"><i>地图</i></div>
     </div>
  </div>
</template>

<script>
export default {
  props: ['bgccolor'],
  data () {
    return {

    }
  }
}
</script>

<style lang='less' scoped>
.nav-bar{
  display: flex;
  width: 100%;
  height: 50px;
  .nav-left{
    line-height: 50px;
    margin-left: 10px;
  }
  .nav-center{
    display: flex;
    flex: 1;
    height: 34px;
    background-color: #fff;
    margin-top: 7px;
    margin-left: 10px;
    border-radius: 3px;
    form{
      height: 34px;
    /deep/  .van-search{
          padding: 0;
      }
    }
    .location{
      // display: flex;
      margin-left: 8px;
      margin-right: 8px;
      margin-top:2px ;
      span{
        font-size: 14px;
      }
    }
  }
  .nav-right{
    margin-right: 15px;
    margin-left: 15px;
    width: 30px;
    height: 30px;
    margin-top: 8px;
    i{
      font-size: 15px;
    }
  }
}

</style>
